package uz.gov.test;

import org.testng.Assert;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import uz.gov.pages.CartWindow;
import uz.gov.pages.HomePage;
import uz.gov.pages.ResultPage;

/**
 * Created by IIGalytska on 04.04.14.
 */
public class RezetkaOrderZeroGoodsNegative extends PrePostConditions{
    @DataProvider(name = "test3")
    public Object[][] provideData() {

        return new Object[][] {
                { "0" },
                /**
                 { 2 , "http://rozetka.com.ua/phones-mp3-gps/c80257/"},
                 { 3 , "http://rozetka.com.ua/tv-photo-video/c80258/"},
                 **/
        };
    }

    @Test(dataProvider = "test3")

    public void testOrder(String param1){

        //start from home page
        HomePage home = new HomePage(driver);
        //navigate to product search result page
        ResultPage result = home.search("ipad");
        //press bey! button for the first link
        CartWindow cart = result.pressBuyForFirstLink();
        //press checkout button


        //Assert.assertFalse(cart.selectZeroGoods(param1));


        Assert.assertTrue(cart.selectInvalidNumberOfGoods(param1).contains("background-color: rgb(255"));
    }





}
